<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>普通局部注册组件</title>
	<script src="vue.js"></script>
</head>
<body>
<div id="app">
  <app-component></app-component>
</div>
<script>
  var appCom = {
      template: '<div>局部注册组件</div>'
  };	
  // 创建根实例
  var vm=new Vue({
      el: '#app',
      components: {
          // <app-component> 将只在父模板可用
          'app-component': appCom
      }  
  })
</script>
</body>
</html>
